﻿using MediatR;
using ProduceBasicData.Domain.RBAC.Enum;
using ProduceBasicData.ErrorCode;

namespace ProduceBasicData.Api.Application.Command.RBAC.Permission
{
    /// <summary>
    /// 更新权限命令
    /// </summary>
    public class UpdatePermissionCommand : IRequest<ApiResult<int>>
    {
        /// <summary>
        /// 主键id
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 权限名称
        /// </summary>
        public string PermissionName { get; set; }

        /// <summary>
        /// 系统编码
        /// </summary>
        public string? PermissionCode { get; set; }

        /// <summary>
        /// 父权限ID
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// URL地址
        /// </summary>
        public string? Path { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string? Icon { get; set; }

        /// <summary>
        /// 权限类型（0-菜单，1-按钮，2-接口）
        /// </summary>
        public PermissionType PermissionType { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public bool State { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdateName { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
    }
}
